<?php
/*
 * estudo de padrões de projetos com php
 * author: fabricio s costa
 * version: 1.0
 * site: http://fabriciojf.com
 */

require_once('com/fabriciojf/action/Action.class.php');
require_once('com/fabriciojf/persistence/CategoriaDAO.class.php');
require_once('com/fabriciojf/security/Permission.class.php');

class CadastroPostAction implements Action {

    public function execute() {
        Permission::requireInRole(array('admin'));

        $categoriaDao = new CategoriaDAO();
        $_REQUEST['categoriaDao'] = $categoriaDao->listAll();

        require('com/fabriciojf/view/CadastroPost.php');
    }

}
?>
